operationally complete hierarchical repository in a relational database

ABSTRACT

A modular repository is described, where operational features may be implemented without the need to scan every resource included in the modular repository. A modular repository includes a dedicated set of database objects containing all information needed to access the resources in the repository. For example, the database objects of a modular repository may include those user identifier mappings and ACL mappings, etc., to which metadata in the modular repository refers. A database system may also include a mechanism through which a modular repository may be mounted under a subdirectory of a common directory in the database system. The resources of a modular repository that are mounted under the common directory may be accessed through the common directory. Further, a client may query the resources of any modular repository mounted under the common directory by making the federated repository, represented by the common directory, the context of the query.

FIELD OF THE INVENTION

The present invention relates to operational features of a databasesystem, and specifically to a modular hierarchically-organizedrepository that facilitates implementation of operational featuresthereon.

BACKGROUND

In typical relational database systems, users store, update, andretrieve information by interacting with user applications (“clients”).The clients respond to the user's interaction by submitting commands toa database application responsible for maintaining the database (a“database server”). The database server responds to the commands byperforming the specified operations on the database.

Relational database systems, herein referred to as simply “databasesystems”, generally excel at handling structured content that maps torows and columns. These traditional relational databases also offeroperational features that allow clients to deploy the structured contentdatabase efficiently. Examples of operational features includepartitioning, replication, and export/import of data, etc. Data withwhich operational features may be implemented by a database system isknown as operationally complete data.

Data partitioning allows a client to manage a particular data partitionindependently from other data partitions. Import and export featuresallow a client to move data that is organized according to a particularlogical model from one database system to another database systemwithout losing the organization of the data. Data that is organizedaccording to a particular logical model may include logical nodes ofdata arranged in a particular hierarchy, where the relationships betweenthe logical nodes comprises the logical model.

Traditional relational database systems have been extended to managehierarchically-organized data, which is also known as “unstructured”data for the purposes of relational database systems. Examples ofunstructured data include file system data, and XML data, etc. Forexample, the Oracle XML DB Repository is a component of Oracle Databasethat is optimized for handling XML data. The Oracle XML DB Repository isdescribed in more detail in the Oracle XML DB Developer's Guide, 10gRelease 2 (10.2) Part Number B14259-02, Chapter 1, accessed on Jul. 31,2009, athttp://download.oracle.com/docs/cd/B19306_(—)01/appdev.102/b14259/xdb01int.htm#ADXDB0100, the contents of which are incorporated by reference in theirentirety for all purposes as if fully set forth herein.

Thus, a database system may include a hierarchical repository, alsoreferred to herein as simply a “repository”, which may include one ormore hierarchically-organized resources. Such resources may include anykind of data that can be identified using a path, such as files,folders, xml nodes, etc. In one embodiment of the invention, examples ofresources do not include relationally structured data, known as tuples.

A repository may be conceptually viewed as a table that stores thecontent of the resources in the repository, and metadata describingfeatures of the resources, in one or more relational columns. Themetadata describing features of the particular resource may include oneor more paths to the resource within the repository, creation date, lastmodified time, content size, owner identifier, etc.

Traditionally, it has been difficult to provide operational features forrepositories with hierarchical content. Specifically, to implementoperational features on a hierarchical repository, each resource in therepository traditionally is scanned, making implementation ofoperational features expensive to implement for hierarchicalrepositories.

To illustrate, repository metadata traditionally refers to informationthat is not stored within the context of the repository's session, whichmay make it difficult to implement import/export features for therepository. For example, a particular repository includes owneridentifiers for each resource in the repository. The owner identifiersmap to user names in a user table that is not stored within the clientsession of the repository. In order to export the repository, thedatabase system must scan each resource in the repository to determinethe user name that corresponds to the resource based on the user table.

Moreover, a repository that shares data with other database entities maycause replication of the repository to be difficult. For example, therepository of the previous example shares the user table with variousdatabase security tables. Thus, to replicate the repository, thedatabase system also replicates pertinent entries in the shared usertable. However, it may not be appropriate to replicate all entries inthe shared user table, e.g., if some of the entries that are used onlyby the database security tables include sensitive information. Thus, toreplicate the repository, the database system scans each resource in therepository to determine which of the rows of the shared user tableshould be replicated.

Traditionally, a single repository in a database system may includevarious types of resources. This diversity of resources within arepository may cause creating a partition for one or more of the typesof resources in the repository to be difficult. For example, aparticular repository includes both purchase order resources andemployee information resources. To partition purchase order resourcesfrom employee information resources, all of the tables corresponding tothe repository are visited, and each resource is scanned to determinethe type of each respective resource.

Furthermore, the resource metadata in a repository may includereferences to physical locations of data. These physical rowidentifiers, or “row identifiers”, are an optimized means of referringto data within the database system. However, the physical locations ofthe data structures in one database system lose meaning when imported toa different database system. Therefore, to export a repository thatincludes physical row identifiers in the metadata for the resources ofthe repository, each resource is scanned to resolve the row identifierof the resource.

The approaches described in this section are approaches that could bepursued, but not necessarily approaches that have been previouslyconceived or pursued. Therefore, unless otherwise indicated, it shouldnot be assumed that any of the approaches described in this sectionqualify as prior art merely by virtue of their inclusion in thissection.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings and in whichlike reference numerals refer to similar elements and in which:

FIG. 1 illustrates an example method for storing and accessing data in amodular repository.

FIG. 2 illustrates an example modular repository that stores, indatabase objects, all information necessary to access the correspondinghierarchically-organized resources.

FIG. 3 illustrates an example method of adding information for aresource to a modular repository, including all information needed toaccess the resource.

FIG. 4 illustrates an example modular repository.

FIG. 5 illustrates example modular repositories, and an example mappingof the resources of these modular repositories to a common directory ofa database system.

FIG. 6 illustrates an example method of performing a query on data inmounted modular repositories.

FIG. 7 is a block diagram of a computer system on which embodiments ofthe invention may be implemented.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however,that the present invention may be practiced without these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order to avoid unnecessarily obscuring thepresent invention.

General Overview

Thus, modular repositories are described herein, where operationalfeatures may be implemented on a modular repository without the need toscan every resource included in the modular repository. Such a modularrepository includes a dedicated set of database objects that contain allinformation needed to access the resources in the repository, includingall content tables needed for the resources. For example, the databaseobjects of a modular repository may include those user identifiermappings and ACL mappings, etc., to which metadata in the modularrepository refers.

A database system may also include a mechanism through which a modularrepository may be mounted under a subdirectory of a common directory inthe database system. The resources of a modular repository that aremounted under the common directory may be accessed through the commondirectory. The set of repositories represented by such a commondirectory is referred to herein as a “federated repository”. Further, aclient may query the resources of any modular repository mounted underthe common directory by making the federated repository, represented bythe common directory, the context of the query.

Modular repositories allow easy implementation of operational featureson the resources of the repository. Each resource in such a modularrepository need not be scanned for an export/import event because allinformation needed for the resources of a modular repository is includedin the database objects for the modular repository. Furthermore, amodular repository maintains physical row identifiers only in indexstructures, which may be rebuilt without scanning the resources. Also,the database objects dedicated to a modular repository may be groupedinto their own tablespace, which allows the data therein to be exportedby simply exporting the corresponding tablespace. A modular repositoryeasily acts as partitioned data because a modular repository may includeonly one type of resource. Thus, without scanning the resources in themodular repository, a modular repository is separately manageable fromother resources in the database system.

Modular Repositories

A modular repository is described herein that contains all of theinformation for a particular set of hierarchically-organized resources,also referred to herein as “data collection”. Such a modular repositoryincludes a set of database objects in which only information for thecorresponding set of hierarchically-organized resources is stored.Examples of database objects include tables, indices, materializedviews, etc. In one embodiment of the invention, the database objects ofa modular repository are located completely within the context of aparticular client schema.

A modular repository is not dependent on data outside the databaseobjects dedicated to the repository, thus allowing implementation ofoperational features on the repository without having to scan eachresource of the modular repository, as described in further detailbelow. Thus, a modular repository includes all information needed toaccess a particular set of resources, and no information that isrequired to access the resources is stored in any database objectoutside of the modular repository. Accessing the resources of a modularrepository may include querying data of the resources, updating theresources, managing the resources, and any other function that may beperformed on the resources of a repository in the context of a databasesystem.

The database objects of a modular repository may be organized in anynumber of ways within the embodiments of the invention. In oneembodiment of the invention, the particular set of database objects fora modular repository are explicitly assigned to the modular repositoryby the database system that manages the database objects. For example, aset of database objects may be created in a dedicated tablespace to bethe database objects for a particular modular repository. Also, adatabase system may create and populate a modular repository upon therequest of a client.

In one embodiment of the invention, constraints may be placed on amodular repository to restrict the type of resource that is included inthe modular repository. For example, a constraint may be placed on aparticular modular repository to restrict the resources in the modularrepository to employee resources only. In this embodiment of theinvention, if a client attempts to add a purchase order resource to theparticular modular repository, the modular repository would cause thedatabase system to throw an error, and the resource would not be addedto the particular modular repository. A constraint may include a list ofresource types allowed to be added to a particular modular repository.

FIG. 1 illustrates an example method 100 for storing and accessing datain a modular repository. At step 102, a particular data collection of aplurality of data collections is stored in a particular set of databaseobjects in a database managed by a database system, wherein allinformation for accessing the particular data collection is containedwithin the particular set of database objects, and no information forany of the other data collections of the plurality of data collectionsis contained within the particular set of database objects.

For example, FIG. 2 illustrates an example modular repository 200 thatstores, in database objects 204, all information necessary to accesshierarchically-organized resources 202. Thus, database objects 204include the content of resources 202 and metadata describing thefeatures of resources 202. Database objects 204 further include any datathat is necessary to resolve any references in the metadata forresources 202. For example, metadata for a particular resource inmodular repository 200 may include a user identifier to refer to theidentity of a particular user, such as the owner of the particularresource. In this example, database objects 204 include a mapping of theuser identifier to a user identity, such as a user name, as described infurther detail below.

At step 104 of method 100, data from the particular data collection isaccessed using only the particular set of database objects. For example,the database system receives a query on resources 202. To evaluate thequery with respect to resources 202, the database system only accessesone or more database objects in database objects 204.

Adding a Resource to a Modular Repository

Metadata for the resources in a modular repository may includeinformation, such as user identifiers, that are references to otherinformation stored in shared tables. A shared table is a database objectthat includes information that is referred to by various entities of adatabase system. For example, user identifiers generally refer to uniqueuser identities, such as user names, that are generally stored in one ormore shared user tables. Information in shared tables may be requiredfor many kinds of access to the resources of a modular repository.Therefore, the database objects of a modular repository include copiesof those portions of shared tables that are referred to by the resourcemetadata in the repository. These copies of information from sharedtables are used only by the database objects of the modular repository.While user identifiers are used to illustrate shared table information,other information is also traditionally stored in shared tables, such asaccess control lists (“ACL”), database links, etc.

FIG. 3 illustrates an example method 300 of adding information for aresource to a modular repository, including all information needed toaccess the resource. To illustrate method 300, modular repository 400 isshown in FIG. 4, in which a hierarchically-organized resources 402include resources representing purchase orders. Thus, modular repository400 is known as “PO” within the database system.

The content and metadata for resources 402 are stored in resource table410. Resource table 410 includes resource column 412 that represents thecontent of each resource in resources 402, res identifier column 414that represents a unique identifier for each resource in resources 402,and owner identifier column 416 that represents a user identifier of theowner of each resource in resources 402. The values shown in rows 418and 420 are non-limiting examples of content and metadata for resources402. For ease of illustration, user identifiers in modular repository400 are represented as letters, but may be represented by numbers, etc.

Modular repository 400 also includes user table 430 that maps useridentifiers at column 432 to corresponding user names at column 434.Only user identifiers included in resource table 410 are mapped to usernames in user table 430. The values shown in rows 436-440 of user table430 are non-limiting examples of user table entries. Furthermore, amodular repository, such as modular repository 400, may includeinformation that is not illustrated in FIG. 4, and may not includeinformation that is illustrated in FIG. 4.

At step 302 of method 300, information for a particular resource isincluded in one or more database objects of the particular set ofdatabase objects. For example, the database system managing modularrepository 400 includes information about a resource corresponding tores identifier “004” with an owner identifier of “SJK” to modularrepository 400. Thus, the database system includes a new row in resourcetable 410 with at least (a) the content of the new resource, (b) the residentifier, “004”, and (c) the owner identifier, “SJK”.

At step 304, it is determined whether data referred to in theinformation for the particular resource is not included in theparticular set of database objects. In other words, it is determinedwhether any information in a table that is shared by various entities inthe database system is required to interpret information included in amodular repository. Continuing with the previous example, the useridentifier, “SJK”, refers to the user identity of the owner of the newresource. The database system determines that the user identitycorresponding to the user identifier, “SJK”, is not included in usertable 430 of modular repository 400.

In response to determining that the data referred to in the informationfor the particular resource is not included in the particular set ofdatabase objects, method 300 continues to step 306, at which the data isadded to the particular set of database objects. For example, thedatabase includes the user name corresponding to user identifier “SJK”in modular repository 400, i.e., at user table 430. The database systemmay obtain this information in any number of ways, including by queryinga database object in the database system that is not included in modularrepository 400, such as a shared user table. The method then finishes atstep 308.

As a further example, the database system includes, in modularrepository 400, information for another resource corresponding to residentifier “005” and owner identifier “DER”. According to step 304 ofmethod 300, the database system determines that none of the informationincluded in modular repository refers to data that is not included inmodular repository 400. Specifically, the database system determinesthat user resource table 410 includes row 440 corresponding to useridentifier “DER”. As such, method 300 finishes at step 308.

The database objects in modular repository 400, such as resource table410, and user table 430, etc., store only information pertaining toresources 402. Thus, none of the mappings found in user table 430 areused to access user identifiers in database system objects outside ofmodular repository 400. Also, all of the information needed to accessresources 402 is included in modular repository 400.

Querying a Modular Repository

Because the database objects of a modular repository contain allinformation needed to access the resources in the modular repository, aquery on the resources of a modular repository need only access thedatabase objects of the modular repository to evaluate the query.

The resources of a hierarchically-organized repository within a databasesystem may be exposed to queries in any number of ways. For example, theOracle XML DB exposes hierarchical XML data using predefined publicviews, called RESOURCE_VIEW and PATH_VIEW, described in more detail inthe Oracle XML DB Developer's Guide, 10g Release 2 (10.2) Part NumberB14259-02, Chapter 22, accessed on Jul. 9, 2009, athttp://download.oracle.com/docs/cd/B19306_(—)01/appdev.102/b14259/xdb18res.htm#sthref2107, the contents of which are incorporated by reference in their entiretyfor all purposes as if fully set forth herein. These public viewsprovide a mechanism for using SQL to access hierarchical data stored ina repository. For purposes of illustration, modular repository 400 isexposed to queries through a public view called “public_view”, whichexposes hierarchical data to queries in a manner that is similar toRESOURCE_VIEW described above. Public_view includes a res column thatincludes information about the properties and content of each resourcein modular repository 400. Public_view also includes, for each resource,a path column that includes a possible path in the hierarchy ofresources 402.

To run a query against a particular modular repository, the query isscoped to the modular repository. Setting the scope of a query to aparticular modular repository indicates that any path referred to in thequery is relative to the root of the hierarchy of resources in themodular repository. The scope of a query may be set to a particularmodular repository in any number of ways within the embodiments of theinvention. For example, the scope of a session in which a particularquery is to be evaluated may be set to modular repository 400, named“PO”, through a command such as “session_scope=PO” implemented by thedatabase system. Furthermore, the scope of a query may be set to amodular repository in the context of the query itself.

To illustrate in the context of modular repository 400, a client may setthe scope of the client's session to modular repository 400. The clientmay then run the following query, Query 1, which is evaluated withrespect to modular repository 400.

Query 1 SELECT path FROM public_view WHERE under_path(res, ‘/2008’) = 1

The solution set for Query 1 includes the path attribute from all rowsin public_view where the resources specified in the res column of thepublic_view are found under “/2008”, evaluated with respect to thehierarchy of resources 402 of modular repository 400.

Federated Repository

Modular repositories may be incorporated into otherhierarchically-organized collections of resources. For example, amodular repository that is managed by a particular database system maybe incorporated into a second hierarchical repository managed by thesame database system by logically mapping the resources in the modularrepository to a subdirectory of the second hierarchical repository. Asubdirectory is any directory of a hierarchy, represented by a containerresource, other than the root of the hierarchy.

In one embodiment of the invention, a modular repository may be mapped,or “mounted”, to one or more subdirectories of a common directory in adatabase system. A common directory is a hierarchically-organized datastructure to which resources of modular repositories may be mapped, andmay be implemented in many ways within the embodiments of the invention.For example, a common directory may be a repository of hierarchicalresources that is accessible in a particular client session, or that isaccessible to any client of the database system at large. As anotherexample, a common directory in a database system may identify domains towhich named references within the session may be resolved, and may beestablished for a period of time, such as for the duration of a clientsession.

The database system managing a particular modular repository maintainsone or more logical mappings to track the one or more subdirectories atwhich the particular modular repository is mounted. A common directoryhaving one or more modular repositories mounted thereto is referred toherein as a “federated repository”.

For example, FIG. 5 illustrates modular repositories 500 and 510, eachof which contains all of the information needed to access purchase orderresources 502 and employee resources 512, respectively, as describedabove. FIG. 5 also illustrates the logical path structure of an examplemapping of the resources of modular repositories 500 and 510 tosubdirectories of a common directory 520 of the database system thatmanages modular repositories 500 and 510.

To mount a modular repository to a subdirectory of a common directory, amount repository API may be defined that includes a mount command, suchas “MOUNT(<modular_repository_name>, <subdirectory_path>)”. Using thismount command, a client may mount resources 502 of modular repository500, named “PO”, to a subdirectory of common directory 520,“/a/Repositories/PO”, in the following manner: “MOUNT(PO,‘/a/Repositories/PO’)”. This command results in the resources of modularrepository 500 being logically available under the specifiedsubdirectory, as illustrated at subdirectory 524 of common directory520. Similarly, resources 512 of modular repository 510 may be mountedto a subdirectory of common directory 520 as follows: “MOUNT(EMP,‘/a/Repositories/EMP’)”, illustrated at subdirectory 522 of commondirectory 520. In one embodiment of the invention, the last item in thesubdirectory path given in a mount command is logically interpreted asthe root of the hierarchy of resources in the mapped modular repository.

FIG. 5 illustrates a non-limiting example of mapping one or more modularrepositories under a common directory. A modular repository may bemapped to any location in a common directory, and two or more modularrepositories may be mapped to the same location in a common directory.In the case of multiple modular repositories being mapped to the samelocation, the database system checks the resources for name conflicts,and throws errors if any conflicts are found. A modular repository neednot be mounted to a subdirectory that corresponds to the name of themodular repository, and is shown as such in FIG. 5 for ease ofillustration.

Using a Federated Repository

When a modular repository is mounted to a common directory, a particularresource of the modular repository may be accessed by prepending thepath of the mount point of the modular repository to the path of theresource in the hierarchy of the modular repository. For example,resource “Y”, located at “/W/Y” in the hierarchy of resources 512 ofmodular repository 510, may be accessed using the path“/a/Repositories/EMP/W/Y” in common directory 520.

Thus, the resources of a mounted modular repository are accessiblethrough the common directory by using an absolute path, i.e., a pathstarting at the root of a common directory. As such, resources of onemounted modular repository, e.g., modular repository 500, may beaccessed from inside the scope of another mounted modular repository,e.g., modular repository 510.

Furthermore, a client may set the scope of a particular query to thefederated repository. Such a query may evaluate over the resources ofany of the modular repositories mounted to the common directory. Thus,in the context of FIG. 5, a query may be run on both modularrepositories 500 and 510 by setting the scope of the query to thefederated repository represented by common directory 520. For example,the scope of a session may be set to the federated repository using thefollowing example command: “session_scope=Federated_Repository”implemented by the database system. FIG. 6 illustrates an example method600 of performing a query on data in mounted modular repositories.

At step 602, a first and a second modular repository are mapped to acommon directory in a database system. For example, a database systemmaps modular repositories 500 and 510 to common directory 520, asillustrated in FIG. 5.

At step 604, a query is received that at least references, through thecommon directory, data from the data collections that correspond to thefirst and second modular repositories. For example, with the clientsession scope set to the federated repository corresponding to commondirectory 520, a client executes the following query, Query 2.

Query 2   SELECT path FROM public_view         WHERE creationDate >to_date( ‘01-SEP-02’,         ‘dd-mmm-yy’)Thus, the database system receives Query 2 that selects the paths ofthose resources in common directory 520—which is the scope of thequery—that have a corresponding creation date after Sep. 1, 2002.

At step 606, one or more sub-queries are created based on the query. Forexample, the database system creates three sub-queries based on Query 2.Specifically, the database system creates a query selecting pathsconforming to the criteria given in Query 2 from each of (a) modularrepository 500, (b) modular repository 510, and (c) the resources incommon directory 520 that are not included in one of modular repository500 and modular repository 510.

At step 608, a first sub-query of the one or more sub-queries isevaluated using a first set of database objects corresponding to thefirst modular repository and a second sub-query of the one or moresub-queries is evaluated using a second set of database objectscorresponding to the second modular repository. For example, thedatabase system evaluates the sub-query created by the database systemfor modular repository 500 using only information from database objects504, which are dedicated to modular repository 500. Likewise, thedatabase system evaluates the sub-query created by the database systemfor modular repository 510 using only information from database objects514, which are dedicated to modular repository 510.

At step 610, results from each sub-query are aggregated to produceresults for the query. For example, results from each of (a) the queryfor modular repository 500, (b) the query for modular repository 510,and (c) the query for the resources in common directory 520 that are notincluded in one of modular repository 500 and modular repository 510 areaggregated. Aggregating query results may include ensuring that eachpath in the results for the query is in the form of an absolute pathfrom the root of common directory 520.

As a further example, a client may evaluate the following Query 3 withthe session scope set to the federated repository corresponding tocommon directory 520.

Query 3   SELECT path FROM public_view         WHERE creationDate >to_date( ‘01-SEP-02’,         ‘dd-mmm-yy’)         AND under_path(res,‘/a/Repositories/PO’) = 1Thus, the database system receives Query 3 that selects the paths ofthose resources in common directory 520 that occur under thesubdirectory “/a/Repositories/PO”, and that have a correspondingcreation date after Sep. 1, 2002.

According to method 600, the database system creates one or moresub-queries based on Query 3. Because Query 3 only evaluates over theresources that occur under the subdirectory “/a/Repositories/PO”, andthe resources of modular repository 500 are the only resources locatedin the specified subdirectory, the database system creates only onesub-query to be evaluated using database objects 504 that are dedicatedto modular repository 500. To create the results set for Query 3, thedatabase system ensures that all of the paths in the results for Query 3are absolute paths from the root of common directory 520, because Query3 is in the scope of the federated repository.

Logical Identifiers

As previously indicated, many repositories include references tophysical locations of data, i.e., “physical row identifiers” or simply“row identifiers”. These physical row identifiers may be used to referto parent or child resources from within a particular resource in arepository, etc. Row identifiers are not used in modular repositoriesbecause row identifiers are specific to the particular database systemin which the resources reside. Thus, logical identifiers are used inmodular repositories to refer to data in the modular repository. Logicalidentifiers uniquely map to physical locations of data, or physical rowidentifiers, within the scope of the modular repository in which thelogical identifiers are found.

The mapping of logical identifiers to physical row identifiers in amodular repository may be stored in one or more index structures in thedatabase objects of the modular repository. Index structures aredatabase objects that provide one or more fast access paths to data in adatabase object. By mapping logical identifiers to row identifiers usingone or more index structures, the database system has fast access to therow identifier corresponding to any given logical identifier that isincluded in the index structure.

To provide fast access paths to data in database objects, an indexstructure generally includes information on the physical location ofdata in the database objects. Thus, when an index structure is importedor replicated in a new database system, the database system rebuilds theindex structure to replace old physical location information with newphysical location information. As such, by maintaining all physical rowidentifiers of a modular repository in one or more index structures, adatabase system may update physical row identifiers of the modularrepository without having to scan each resource of the modularrepository by simply rebuilding the index structures storing physicallocation information.

Applying Operational Features to a Modular Repository

A modular repository allows a database system to easily implementoperational features for the resources of the modular repository. In oneembodiment of the invention, an operational feature is easilyimplemented on a particular repository if the implementation of thefeature does not involve scanning each resource of the repository.

For example, a modular repository according to the embodiments of theinvention is easily exported from one database system and imported toanother database system. Each resource in such a modular repository neednot be scanned for such an export/import event because all informationneeded for the resources of a modular repository is included in thedatabase objects for the modular repository. Furthermore, a modularrepository maintains physical row identifiers only in index structures,which may be rebuilt without scanning the resources. Also, in theembodiment of the invention where the database objects of a modularrepository are grouped into their own tablespace, a modular database maybe exported by simply exporting the corresponding tablespace.

Moreover, a modular repository easily acts as partitioned data because amodular repository may include only one type of resource. Thus, withoutscanning the resources in the modular repository, a modular repositoryis separately manageable from other resources in the database system.And, in the embodiment of the invention where the database objects of amodular repository are grouped into their own tablespace, all of thedatabase objects for the modular repository may be modified by modifyingattributes of the corresponding tablespace.

Hardware Overview

According to one embodiment, the techniques described herein areimplemented by one or more special-purpose computing devices. Thespecial-purpose computing devices may be hard-wired to perform thetechniques, or may include digital electronic devices such as one ormore application-specific integrated circuits (ASICs) or fieldprogrammable gate arrays (FPGAs) that are persistently programmed toperform the techniques, or may include one or more general purposehardware processors programmed to perform the techniques pursuant toprogram instructions in firmware, memory, other storage, or acombination. Such special-purpose computing devices may also combinecustom hard-wired logic, ASICs, or FPGAs with custom programming toaccomplish the techniques. The special-purpose computing devices may bedesktop computer systems, portable computer systems, handheld devices,networking devices or any other device that incorporates hard-wiredand/or program logic to implement the techniques.

For example, FIG. 7 is a block diagram that illustrates a computersystem 700 upon which an embodiment of the invention may be implemented.Computer system 700 includes a bus 702 or other communication mechanismfor communicating information, and a hardware processor 704 coupled withbus 702 for processing information. Hardware processor 704 may be, forexample, a general purpose microprocessor.

Computer system 700 also includes a main memory 706, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 702for storing information and instructions to be executed by processor704. Main memory 706 also may be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 704. Such instructions, when stored in storagemedia accessible to processor 704, render computer system 700 into aspecial-purpose machine that is customized to perform the operationsspecified in the instructions.

Computer system 700 further includes a read only memory (ROM) 708 orother static storage device coupled to bus 702 for storing staticinformation and instructions for processor 704. A storage device 710,such as a magnetic disk or optical disk, is provided and coupled to bus702 for storing information and instructions.

Computer system 700 may be coupled via bus 702 to a display 712, such asa cathode ray tube (CRT), for displaying information to a computer user.An input device 714, including alphanumeric and other keys, is coupledto bus 702 for communicating information and command selections toprocessor 704. Another type of user input device is cursor control 716,such as a mouse, a trackball, or cursor direction keys for communicatingdirection information and command selections to processor 704 and forcontrolling cursor movement on display 712. This input device typicallyhas two degrees of freedom in two axes, a first axis (e.g., x) and asecond axis (e.g., y), that allows the device to specify positions in aplane.

Computer system 700 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware and/orprogram logic which in combination with the computer system causes orprograms computer system 700 to be a special-purpose machine. Accordingto one embodiment, the techniques herein are performed by computersystem 700 in response to processor 704 executing one or more sequencesof one or more instructions contained in main memory 706. Suchinstructions may be read into main memory 706 from another storagemedium, such as storage device 710. Execution of the sequences ofinstructions contained in main memory 706 causes processor 704 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “storage media” as used herein refers to any media that storedata and/or instructions that cause a machine to operation in a specificfashion. Such storage media may comprise non-volatile media and/orvolatile media. Non-volatile media includes, for example, optical ormagnetic disks, such as storage device 710. Volatile media includesdynamic memory, such as main memory 706. Common forms of storage mediainclude, for example, a floppy disk, a flexible disk, hard disk, solidstate drive, magnetic tape, or any other magnetic data storage medium, aCD-ROM, any other optical data storage medium, any physical medium withpatterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, NVRAM, anyother memory chip or cartridge.

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 702. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 704 for execution. For example,the instructions may initially be carried on a magnetic disk or solidstate drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 700 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 702. Bus 702 carries the data tomain memory 706, from which processor 704 retrieves and executes theinstructions. The instructions received by main memory 706 mayoptionally be stored on storage device 710 either before or afterexecution by processor 704.

Computer system 700 also includes a communication interface 718 coupledto bus 702. Communication interface 718 provides a two-way datacommunication coupling to a network link 720 that is connected to alocal network 722. For example, communication interface 718 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 718 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 718sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

Network link 720 typically provides data communication through one ormore networks to other data devices. For example, network link 720 mayprovide a connection through local network 722 to a host computer 724 orto data equipment operated by an Internet Service Provider (ISP) 726.ISP 726 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 728. Local network 722 and Internet 728 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 720and through communication interface 718, which carry the digital data toand from computer system 700, are example forms of transmission media.

Computer system 700 can send messages and receive data, includingprogram code, through the network(s), network link 720 and communicationinterface 718. In the Internet example, a server 730 might transmit arequested code for an application program through Internet 728, ISP 726,local network 722 and communication interface 718.

The received code may be executed by processor 704 as it is received,and/or stored in storage device 710, or other non-volatile storage forlater execution.

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. Thus, the sole and exclusive indicatorof what is the invention, and is intended by the applicants to be theinvention, is the set of claims that issue from this application, in thespecific form in which such claims issue, including any subsequentcorrection. Any definitions expressly set forth herein for termscontained in such claims shall govern the meaning of such terms as usedin the claims. Hence, no limitation, element, property, feature,advantage or attribute that is not expressly recited in a claim shouldlimit the scope of such claim in any way. The specification and drawingsare, accordingly, to be regarded in an illustrative rather than arestrictive sense.

1. A computer-executed method comprising: storing a particularhierarchically-organized collection of resources in a particular set ofdatabase objects in a database managed by a first database system;wherein all information for accessing the particularhierarchically-organized collection of resources is contained within theparticular set of database objects; and incorporating the particularhierarchically-organized collection of resources into a secondhierarchically-organized collection of resources; wherein the method isperformed by one or more computing devices.
 2. The computer-executedmethod of claim 1, wherein the step of incorporating the particularhierarchically-organized collection of resources into the secondhierarchically-organized collection of resources further comprises:mapping one or more resources in the particular hierarchically-organizedcollection of resources to a first subdirectory of the secondhierarchically-organized collection of resources; wherein the secondhierarchically-organized collection of resources is a common directorythat is associated with the database.
 3. The computer-executed method ofclaim 2, further comprising: storing a third hierarchically-organizedcollection of resources in a second set of database objects; wherein allinformation for accessing the third hierarchically-organized collectionof resources is contained within the second set of database objects;mapping one or more resources in the third hierarchically-organizedcollection of resources to a second subdirectory of the secondhierarchically-organized collection of resources; receiving a query, ina context of the second hierarchically-organized collection ofresources, that requires evaluation over both the particularhierarchically-organized collection of resources and the thirdhierarchically-organized collection of resources; and evaluating thequery using, at least, the particular set of database objects and thesecond set of database objects.
 4. The computer-executed method of claim3, wherein the step of evaluating the query further comprises: creatinga plurality of sub-queries based on the query; evaluating a firstsub-query of the plurality of sub-queries using the particular set ofdatabase objects; and evaluating a second sub-query of the plurality ofsub-queries using the second set of database objects.
 5. Thecomputer-executed method of claim 1, wherein the particular set ofdatabase objects includes one or more database tables indexed by logicalidentifiers; and wherein the method further comprises associating rowidentifiers, identifying physical locations for rows in the one or moredatabase tables, with the logical identifiers using one or more indexstructures included in the particular set of database objects.
 6. Thecomputer-executed method of claim 1, wherein: the first database systemincludes a particular tablespace; only the particular set of databaseobjects is stored in the particular tablespace; and the particular setof database objects are located completely within the context of aparticular schema.
 7. The computer-executed method of claim 1, furthercomprising: transferring the particular hierarchically-organizedcollection of resources from the first database system to a seconddatabase system; wherein the particular hierarchically-organizedcollection of resources is organized according to a logical model in thefirst database system; wherein the particular hierarchically-organizedcollection of resources is organized according to the same logical modelin the second database system; and wherein the step of transferring doesnot include scanning each resource in the particularhierarchically-organized collection of resources.
 8. Thecomputer-executed method of claim 1, wherein storing the particularhierarchically-organized collection of resources in the particular setof database objects further comprises: including information for aparticular resource in one or more database objects of the particularset of database objects; determining whether data referred to in theinformation for the particular resource is not included in theparticular set of database objects; and in response to determining thatthe data referred to in the information for the particular resource isnot included in the particular set of database objects, adding the data,referred to in the information for the particular resource, to theparticular set of database objects.
 9. The computer-executed method ofclaim 8, wherein the step of including information for the particularresource in one or more database objects of the particular set ofdatabase objects further comprises: determining a type of the particularresource; determining whether the type of the particular resourceconforms to a constraint on the type of resources to be included in theparticular set of database objects; and only in response to determiningthat the type of the particular resource conforms to the constraint onthe type of resources to be included in the particular set of databaseobjects, including information for the particular resource in one ormore database objects of the particular set of database objects.
 10. Thecomputer-executed method of claim 1, wherein the particular set ofdatabase objects includes (a) a table that maps user identifiers,included in the particular hierarchically-organized collection ofresources, to user names, and (b) a table that represents ACLinformation for the particular hierarchically-organized collection ofresources.
 11. A computer-readable storage medium that storesinstructions which, when executed by one or more processors, cause theone or more processors to perform the steps of: storing a particularhierarchically-organized collection of resources in a particular set ofdatabase objects in a database managed by a first database system;wherein all information for accessing the particularhierarchically-organized collection of resources is contained within theparticular set of database objects; and incorporating the particularhierarchically-organized collection of resources into a secondhierarchically-organized collection of resources; wherein the method isperformed by one or more computing devices.
 12. The computer-readablestorage medium of claim 11, wherein the step of incorporating theparticular hierarchically-organized collection of resources into thesecond hierarchically-organized collection of resources furthercomprises: mapping one or more resources in the particularhierarchically-organized collection of resources to a first subdirectoryof the second hierarchically-organized collection of resources; whereinthe second hierarchically-organized collection of resources is a commondirectory that is associated with the database.
 13. Thecomputer-readable storage medium of claim 12, wherein the instructionsfurther comprise instruction which, when executed by the one or moreprocessors, further cause the one or more processors to perform thesteps of: storing a third hierarchically-organized collection ofresources in a second set of database objects; wherein all informationfor accessing the third hierarchically-organized collection of resourcesis contained within the second set of database objects; mapping one ormore resources in the third hierarchically-organized collection ofresources to a second subdirectory of the secondhierarchically-organized collection of resources; receiving a query, ina context of the second hierarchically-organized collection ofresources, that requires evaluation over both the particularhierarchically-organized collection of resources and the thirdhierarchically-organized collection of resources; and evaluating thequery using, at least, the particular set of database objects and thesecond set of database objects.
 14. The computer-readable storage mediumof claim 13, wherein the step of evaluating the query further comprises:creating a plurality of sub-queries based on the query; evaluating afirst sub-query of the plurality of sub-queries using the particular setof database objects; and evaluating a second sub-query of the pluralityof sub-queries using the second set of database objects.
 15. Thecomputer-readable storage medium of claim 11, wherein the particular setof database objects includes one or more database tables indexed bylogical identifiers; and wherein the method further comprisesassociating row identifiers, identifying physical locations for rows inthe one or more database tables, with the logical identifiers using oneor more index structures included in the particular set of databaseobjects.
 16. The computer-readable storage medium of claim 11, wherein:the first database system includes a particular tablespace; only theparticular set of database objects is stored in the particulartablespace; and the particular set of database objects are locatedcompletely within the context of a particular schema.
 17. Thecomputer-readable storage medium of claim 11, wherein the instructionsfurther comprise instruction which, when executed by the one or moreprocessors, further cause the one or more processors to perform thesteps of: transferring the particular hierarchically-organizedcollection of resources from the first database system to a seconddatabase system; wherein the particular hierarchically-organizedcollection of resources is organized according to a logical model in thefirst database system; wherein the particular hierarchically-organizedcollection of resources is organized according to the same logical modelin the second database system; and wherein the step of transferring doesnot include scanning each resource in the particularhierarchically-organized collection of resources.
 18. Thecomputer-readable storage medium of claim 11, wherein the step ofstoring the particular hierarchically-organized collection of resourcesin the particular set of database objects further comprises: includinginformation for a particular resource in one or more database objects ofthe particular set of database objects; determining whether datareferred to in the information for the particular resource is notincluded in the particular set of database objects; and in response todetermining that the data referred to in the information for theparticular resource is not included in the particular set of databaseobjects, adding the data, referred to in the information for theparticular resource, to the particular set of database objects.
 19. Thecomputer-readable storage medium of claim 18, wherein the step ofincluding information for the particular resource in one or moredatabase objects of the particular set of database objects furthercomprises: determining a type of the particular resource; determiningwhether the type of the particular resource conforms to a constraint onthe type of resources to be included in the particular set of databaseobjects; and only in response to determining that the type of theparticular resource conforms to the constraint on the type of resourcesto be included in the particular set of database objects, includinginformation for the particular resource in one or more database objectsof the particular set of database objects.
 20. The computer-readablestorage medium of claim 11, wherein the particular set of databaseobjects includes (a) a table that maps user identifiers, included in theparticular hierarchically-organized collection of resources, to usernames, and (b) a table that represents ACL information for theparticular hierarchically-organized collection of resources.